<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/appmanager/d_CharLibrary.js此处编写
 -->
<template>
    <div>
        <view-grid :columns="columns"
                   :detail="detail"
                   :editFormFileds="editFormFileds"
                   :editFormOptions="editFormOptions"
                   :searchFormFileds="searchFormFileds"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/appmanager/d_CharLibrary.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'CharLibraryId',
                    footer: "Foots",
                    cnName: '字列表',
                    name: 'd_CharLibrary',
                    url: "/d_CharLibrary/",
                    sortName: "CreateDate"
                },
                extend: extend,
                editFormFileds: {"Char":"","CharLibraryId":"","Category":"","Spell":""},
                editFormOptions: [[{"title":"生字","field":"Char","type":"text"},
                               {"title":"字编号","required":true,"field":"CharLibraryId","disabled":true,"type":"text"},
                               {"dataKey":"chartype","title":"生词读写","field":"Category","type":"switch"},
                               {"title":"拼音","field":"Spell","type":"text"}]],
                searchFormFileds: {"Char":"","CharLibraryId":"","Category":"","Spell":""},
                searchFormOptions: [[{"title":"生字","field":"Char","type":"text"},{"title":"字编号","field":"CharLibraryId","type":"text"},{"dataKey":"chartype","title":"生词读写","field":"Category","type":"switch"},{"title":"拼音","field":"Spell","type":"text"}]],
                columns: [{field:'Char',title:'生字',type:'string',link:true,width:120,align:'left',sortable:true},
                       {field:'CharLibraryId',title:'字编号',type:'bigint',width:120,readonly:true,require:true,align:'left'},
                       {field:'Category',title:'生词读写',type:'int',bind:{ key:'chartype',data:[]},width:120,align:'left'},
                       {field:'Spell',title:'拼音',type:'string',width:120,align:'left'},
                       {field:'Strokes',title:'笔画 ',type:'string',width:120,align:'left'},
                       {field:'Stroke',title:'笔画',type:'string',width:120,align:'left'},
                       {field:'EnStrokes',title:'字母标识',type:'string',width:120,align:'left'},
                       {field:'Sound',title:'音频',type:'string',width:120,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:120,align:'left'},
                       {field:'CreateID',title:'CreateID',type:'int',width:120,hidden:true,align:'left'},
                       {field:'Creator',title:'Creator',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateDate',title:'CreateDate',type:'datetime',width:120,hidden:true,align:'left',sortable:true},
                       {field:'ModifyID',title:'ModifyID',type:'int',width:120,hidden:true,align:'left'},
                       {field:'Modifier',title:'Modifier',type:'string',width:120,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'ModifyDate',type:'datetime',width:120,hidden:true,align:'left',sortable:true}],
                detail: {
                    cnName:"字词列表",
                    columns: [{field:'Id',title:'词编号',type:'bigint',width:120,readonly:true,edit:{type:'text'},require:true,align:'left',sortable:true},
                       {field:'Word',title:'词',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'CharLibraryId',title:'生字编号',type:'bigint',width:120,readonly:true,edit:{type:'text'},align:'left'},
                       {field:'Index',title:'生字索引',type:'int',width:120,edit:{type:'number'},align:'left'},
                       {field:'WordSpell',title:'词拼音',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'WordStroke',title:'词笔画',type:'string',width:120,align:'left'},
                       {field:'Sound',title:'词的音频',type:'string',width:120,align:'left'},
                       {field:'Important',title:'是否重点词',type:'int',bind:{ key:'enable',data:[]},width:120,edit:{type:'switch'},align:'left'},
                       {field:'CreateID',title:'CreateID',type:'int',width:120,hidden:true,align:'left'},
                       {field:'Creator',title:'Creator',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateDate',title:'CreateDate',type:'datetime',width:120,hidden:true,align:'left',sortable:true},
                       {field:'ModifyID',title:'ModifyID',type:'int',width:120,hidden:true,align:'left'},
                       {field:'Modifier',title:'Modifier',type:'string',width:120,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'ModifyDate',type:'datetime',width:120,hidden:true,align:'left',sortable:true}],
                    sortName: "CreateDate",
                    key:"Id"
                }
            };
        }
    };
    export default vueParam;
</script>
